public static IQueryable<ProdType> GetDistinctProdType( this IQueryable<ProdInfo> query, int categoryId) { return (from p in query where p.CatID == categoryId select p.Type).Distinct(); }